from django import forms
from django.forms import fields

class UserInfoForm(forms.Form):
	name = fields.CharField(
        max_length=18,
        min_length=6,
        required = True,
        error_messages={
            'required':'用户输入为空',
            'max_length':'用户输入太长了',
             'min_length':'用户输入太短了'
        })    #自定义错误显示信息
	type = fields.IntegerField(required=True)
	create_data = fields.DateTimeField()
	update_data = fields.DateTimeField()